public class RoleTest {
    public static void main(String[] args) {
        Role r1 = new Role("东方不败",100);
        Role r2 = new Role("精灵王",100);
        //开始回合游戏：
        while (true){
            r1.attack(r2);
            if (r2.getBloodType()==0){
                System.out.println(r1.getRoleName()+"KO了"+r2.getRoleName());
                break;
            }
            r2.attack(r1);
            if (r1.getBloodType()==0){
                System.out.println(r2.getRoleName()+"KO了"+r1.getRoleName());
                break;
            }
        }
    }
}
